﻿using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Terraria.DataStructures
{
	// Token: 0x0200047D RID: 1149
	public class DrawAnimationVertical : DrawAnimation
	{
		// Token: 0x060026A8 RID: 9896 RVA: 0x0001AE68 File Offset: 0x00019068
		public DrawAnimationVertical(int ticksperframe, int frameCount)
		{
			this.Frame = 0;
			this.FrameCounter = 0;
			this.FrameCount = frameCount;
			this.TicksPerFrame = ticksperframe;
		}

		// Token: 0x060026A9 RID: 9897 RVA: 0x00492744 File Offset: 0x00490944
		public override void Update()
		{
			int num = this.FrameCounter + 1;
			this.FrameCounter = num;
			if (num >= this.TicksPerFrame)
			{
				this.FrameCounter = 0;
				num = this.Frame + 1;
				this.Frame = num;
				if (num >= this.FrameCount)
				{
					this.Frame = 0;
				}
			}
		}

		// Token: 0x060026AA RID: 9898 RVA: 0x0001AE8C File Offset: 0x0001908C
		public override Rectangle GetFrame(Texture2D texture)
		{
			return texture.Frame(1, this.FrameCount, 0, this.Frame);
		}
	}
}
